package com.bw.parkingspace_module.parkingedit

import com.bw.parkingspace_module.parkingedit.entity.*
import com.kf.common.entity.BaseEntity
import kotlinx.coroutines.flow.Flow
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part

interface ApiService {
    //申请车辆可选颜色接口
    @POST("sysColor/selColor")
    fun requestColor(): Flow<BaseEntity<List<ColorEntity>>>

    //添加车辆接口
    @POST("sysCar/addCar")
    fun requestCar(@Body body: RequestBody): Flow<BaseEntity<CarEntity>>

    //申请部门接口
    @POST("sysDepartment/selMyDepartment")
    fun requestDept(@Body body: RequestBody): Flow<BaseEntity<List<DeptEntity>>>

    //添加车辆图片接口
    @POST("sysCar/addCarImg")
    fun requestCarImage(@Body body: RequestBody): Flow<BaseEntity<ImageEntity>>

    //申请车位接口
    @POST("sysParking/applyParking")
    fun requestParkingEdit(@Body body: RequestBody): Flow<BaseEntity<ParkingEditEntity>>

    //上传图片接口
    @Multipart
    @POST("fileUpload")
    fun upLoadCarImg(@Part listImg: List<MultipartBody.Part>): Flow<BaseEntity<LoadImgEntity>>
}